﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace LINQ_To_XML
{
    public class XMLFileOperation
    {
        /// <summary>
        /// Create XML File
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="filePath"></param>
        public void FileCerate(string fileName, string filePath)
        {
            XDocument newDocument = new XDocument
                (
                    new XDeclaration ("1.0","utf-8","yes"),
                    new XElement("Initialization","Initialization")
                );
            newDocument.Save(filePath+fileName);

        }
        /// <summary>
        /// Load XML File to XElement
        /// </summary>
        /// <param name="xel"></param>
        /// <param name="filePath"></param>
        public void FileLoad(XElement xel, string filePath)
        {
            xel = XElement.Load(@""+filePath);
        }
    }
}
